.class public Lcom/waiqin365/base/db/statusreport/f;
.super Ljava/lang/Object;


# static fields
.field private static a:Lcom/waiqin365/base/db/statusreport/f;


# instance fields
.field private b:Landroid/database/sqlite/SQLiteDatabase;

.field private c:Lcom/waiqin365/base/db/statusreport/a;

.field private d:Lcom/waiqin365/base/db/statusreport/d;

.field private e:Lcom/waiqin365/base/db/statusreport/StatusReportDao;


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .locals 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/fiberhome/gaea/client/c/b;->g()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "data/db/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_0

    invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z

    :cond_0
    new-instance v1, Lcom/waiqin365/base/db/statusreport/b;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, "statusreport.db"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const/4 v2, 0x0

    invoke-direct {v1, p1, v0, v2}, Lcom/waiqin365/base/db/statusreport/b;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;)V

    invoke-virtual {v1}, Lcom/waiqin365/base/db/statusreport/b;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->b:Landroid/database/sqlite/SQLiteDatabase;

    new-instance v0, Lcom/waiqin365/base/db/statusreport/a;

    iget-object v1, p0, Lcom/waiqin365/base/db/statusreport/f;->b:Landroid/database/sqlite/SQLiteDatabase;

    invoke-direct {v0, v1}, Lcom/waiqin365/base/db/statusreport/a;-><init>(Landroid/database/sqlite/SQLiteDatabase;)V

    iput-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->c:Lcom/waiqin365/base/db/statusreport/a;

    iget-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->c:Lcom/waiqin365/base/db/statusreport/a;

    sget-object v1, Lde/greenrobot/dao/identityscope/IdentityScopeType;->None:Lde/greenrobot/dao/identityscope/IdentityScopeType;

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/a;->a(Lde/greenrobot/dao/identityscope/IdentityScopeType;)Lcom/waiqin365/base/db/statusreport/d;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->d:Lcom/waiqin365/base/db/statusreport/d;

    iget-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->d:Lcom/waiqin365/base/db/statusreport/d;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/statusreport/d;->a()Lcom/waiqin365/base/db/statusreport/StatusReportDao;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->e:Lcom/waiqin365/base/db/statusreport/StatusReportDao;

    return-void
.end method

.method public static a(Landroid/content/Context;)Lcom/waiqin365/base/db/statusreport/f;
    .locals 2

    sget-object v0, Lcom/waiqin365/base/db/statusreport/f;->a:Lcom/waiqin365/base/db/statusreport/f;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/base/db/statusreport/f;

    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/waiqin365/base/db/statusreport/f;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/waiqin365/base/db/statusreport/f;->a:Lcom/waiqin365/base/db/statusreport/f;

    :cond_0
    sget-object v0, Lcom/waiqin365/base/db/statusreport/f;->a:Lcom/waiqin365/base/db/statusreport/f;

    return-object v0
.end method


# virtual methods
.method public a()Lcom/waiqin365/base/db/statusreport/StatusReportDao;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/base/db/statusreport/f;->e:Lcom/waiqin365/base/db/statusreport/StatusReportDao;

    return-object v0
.end method
